package task13;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-09-26
 * Time:21:32
 */
import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Demo2 {

    public static boolean isLuck(String str){
        List<Integer> list=new ArrayList<>();
        for (int i = 1; i < str.length(); i+=3) {
            list.add(Integer.parseInt(str,i));
        }

        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int[] num1=new int[n];
            int[] num2=new int[n];
            HashSet<String> set=new HashSet<>();
            for (int i = 0; i < n; i++) {
                num1[i]=in.nextInt();
            }
            for (int i = 0; i < n; i++) {
                for (int j = n; j > 0; j--) {
                    if (i < j) {
                        num2 = Arrays.copyOfRange(num1, i, j);
                    }
                    String str=Arrays.toString(num2);
                    if(!set.contains(str)){
                        System.out.println(str);
                        isLuck(str);
                        set.add(str);
                    }
                }
            }
        }
    }
}
